<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1>查询结果</h1>
    <form>
        <input type="text" name="name"/>
        <input type="button" value="Search" onclick="doSearch()"/>
    </form>
    <table>
        <tr>
            <th>id</th>
            <th>name</th>
            <th>remark</th>
            <th>createdTime</th>
            <th>opreation</th>
        </tr>
        <tr th:each="goods:${list}">
            <td th:text="${goods.id}"></td>
            <td th:text="${goods.name}"></td>
            <td th:text="${goods.remark}"></td>
            <td th:text="${goods.createdTime}"></td>
            <td>
                <input type="button" value="delete"/>
                <input type="button" value="update"/>
            </td>
        </tr>
    </table>
<script>
    function doSearch(){
        var name=document.forms[0].name.value;
        location.href=`http://localhost:8080/findById/${name}`;
    }
</script>
</body>
</html>